#!/usr/bin/env python
# -*- coding: utf-8 -*-
from cherrytemplate import renderTemplate
import inspect,os
from __init__ import FConfig

defaultTemplateDir = os.path.join(FConfig.DATADIR,'templates')

def Template(nom):
    loc = inspect.currentframe(1).f_locals
    glob = inspect.currentframe(1).f_globals
    loc.update( {"VERSION":FConfig.VERSION} )
    return renderTemplate(file=os.path.join(FConfig.DATADIR,"templates",nom),loc=loc,glob=glob)

